﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;

using System.Web;
using NetDon.eBoss.Data.CollectionClasses;
using NetDon.eBoss.Data.EntityClasses;
using NetDon.eBoss.Data.HelperClasses;
using NetDon.eBoss.Portal.Common;
using SD.LLBLGen.Pro.ORMSupportClasses;


namespace NetDon.eBoss.Portal.HtmlTool
{
    [DataObject]
    public class HtmlToolDataSource
    {



        [DataObjectMethod(DataObjectMethodType.Select)]
        public IEnumerable<HtmltoolcolorEntity> RetrieveHtmlToolColor()
        {
            var collection = new HtmltoolcolorCollection();
            collection.GetMulti(HtmltoolcolorFields.Sitecode == (int)eBaySites.US);

            return collection;
        }
        [DataObjectMethod(DataObjectMethodType.Select)]
        public IEnumerable<HtmltoolstyleEntity> RetrieveHtmlToolStyle(int categoryId)
        {
            var collection = new HtmltoolstyleCollection();
            collection.GetMulti(HtmltoolstyleFields.Sitecode == (int)eBaySites.US & HtmltoolstyleFields.Categoryruleid ==categoryId);

            return collection;
        }


        [DataObjectMethod(DataObjectMethodType.Select)]
        public IEnumerable<HtmltooltrademarksettingEntity> RetrieveHtmlToolTrademark()
        {
            var collection = new HtmltooltrademarksettingCollection();
            collection.GetMulti(null,9999,new SortExpression(HtmltooltrademarksettingFields.Name|SortOperator.Ascending));

            return collection;
        }


        [DataObjectMethod(DataObjectMethodType.Select)]
        public IEnumerable<HtmltoolcategoryruleEntity> RetrieveHtmlToolEbayCategory()
        {
            var collection = new HtmltoolcategoryruleCollection();
            collection.GetMulti(null);

            return collection;
        }


        [DataObjectMethod(DataObjectMethodType.Select)]
        public IEnumerable<TemplateEntity> RetrieveHtmlTemplate()
        {
            var collection = new TemplateCollection();
            collection.GetMulti(null);

            return collection;
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public IEnumerable<HtmltoolcolorEntity> RetrieveeBayColors()
        {
            var collection = new HtmltoolcolorCollection();
            collection.GetMulti(HtmltoolcolorFields.Sitecode == (int)eBaySites.US);

            return collection;
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public IEnumerable<HtmltoolaccountEntity> RetrieveHtmltoolAccounts()
        {
            var collection = new HtmltoolaccountCollection();
            collection.GetMulti(null);

            return collection;
        }




    }


}